package com.power.using.mydaggerp.model.gankio.tabs;

import android.support.annotation.NonNull;

import com.power.using.mydaggerp.api.GankioApi;
import com.power.using.mydaggerp.base.BaseModel;
import com.power.using.mydaggerp.contract.gankio.tabs.GankIoWelfareContract;
import com.power.using.mydaggerp.model.bean.gankio.GankIoWelfareListBean;
import com.zyw.horrarndoo.sdk.helper.RetrofitCreateHelper;
import com.zyw.horrarndoo.sdk.helper.RxHelper;

import io.reactivex.Observable;

/**
 * Created by 聪明一只哈 on 2019/10/14.
 * Time: 2019/10/14  14:07
 */
public class GankIoWelfareModel extends BaseModel implements GankIoWelfareContract.IGankIoWelfareModel{

    @NonNull
    public static GankIoWelfareModel newInstance() {
        return new GankIoWelfareModel();
    }


    @Override
    public Observable<GankIoWelfareListBean> getWelfareList(int pre_page, int page) {
        return RetrofitCreateHelper.createApi(GankioApi.class,GankioApi.HOST)
                .getGankIoWelfareList(pre_page, page).compose(RxHelper.<GankIoWelfareListBean>rxSchedulerHelper());
    }

    @Override
    public Observable<Boolean> recordItemIsRead(String key) {
        return null;
    }
}
